package com.sino.province.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sino.base.basecontroller.BaseController;
import com.sino.province.service.ProvinceService;

@Controller
@Scope("prototype")
@RequestMapping("/province/")
public class ProvinceController extends BaseController {

	@Autowired
	private ProvinceService provinceService;
	
	
	/**
	 * 获取全国销量情况
	 * @return
	 */
	@RequestMapping("ProvinceMap.html")	
	public @ResponseBody List<Map<String, Object>> getProvinceMap(String type,String province) {
		List<Map<String, Object>> data=provinceService.getProvinceMap(type,province);
		return data;
	}
	
	/**
	 * 查询全国销量top10
	 * @return
	 */
	@RequestMapping("ProvinceTopTen.html")	
	public @ResponseBody List<Map<String, Object>> getProvinceTopTen(String type,String province) {
		List<Map<String, Object>> data=provinceService.getProvinceTopTen(type,province);
		return data;
	}
	
	/**
	 * 查询全国实时交易量
	 * @return
	 */
	@RequestMapping("ProvinceRealTime.html")	
	public @ResponseBody List<Map<String, Object>> getProvinceRealTime(String type,String province) {
		List<Map<String, Object>> data=provinceService.getProvinceRealTime(type,province);
		return data;
	}
	
	/**
	 * 查询全国交易种类top10
	 * @return
	 */
	@RequestMapping("ProvinceTypeTopTen.html")	
	public @ResponseBody List<Map<String, Object>> provinceTypeTopTen(String type,String province) {
		List<Map<String, Object>> data=provinceService.provinceTypeTopTen(type,province);
		return data;
	}
	
	/**
	 * 查询全国交易量
	 * @return
	 */
	@RequestMapping("ProvinceSaleAmount.html")	
	public @ResponseBody List<Map<String, Object>> provinceSaleAmount(String type,String province) {
		List<Map<String, Object>> data=provinceService.provinceSaleAmount(type,province);
		return data;
	}
	
	
}
